import { request } from '../request';

/** 获取语言下拉选项 */
export function fetchLanguageOptions() {
    return request<Api.Language.LanguageOption[]>({
        url: '/Languages/Language',
        method: 'get'
    });
}

/** 获取语言配置列表 */
export function fetchLanguageList() {
    return request<Api.Language.LanguageDto[]>({
        url: '/Languages/LanguageList',
        method: 'get'
    });
}

/** 添加语言配置 */
export function addLanguage(data: Api.Language.LanguageVo) {
    return request<number>({
        url: '/Languages/Language',
        method: 'post',
        data
    });
}

/** 修改语言配置 */
export function updateLanguage(data: Api.Language.LanguageVo) {
    return request<number>({
        url: '/Languages/Language',
        method: 'put',
        data
    });
}

/** 删除语言配置 */
export function deleteLanguage(id: string) {
    return request<number>({
        url: `/Languages/Language/${id}`,
        method: 'delete'
    });
} 